#include<stdio.h>
#include<unistd.h>
#include<string.h>

const char* lable = "|\\-/";
int main()
{
    int i = 0;
    char bar[102];
    memset(bar,0,sizeof(bar));
    while(i<=100)
    {
        printf("[%-100s][%d%%][%c]\r",bar,i,lable[i%4]);
        fflush(stdout);
        usleep(50000);
        bar[i++] = '#';
    }
    printf("\n");
    return 0;
}